/*
 Navicat Premium Data Transfer

 Source Server         : mongodb
 Source Server Type    : MongoDB
 Source Server Version : 40024
 Source Host           : localhost:27017
 Source Schema         : contract2

 Target Server Type    : MongoDB
 Target Server Version : 40024
 File Encoding         : 65001

 Date: 25/05/2021 21:08:08
*/


// ----------------------------
// Collection structure for admin
// ----------------------------
db.getCollection("admin").drop();
db.createCollection("admin");

// ----------------------------
// Documents of admin
// ----------------------------
db.getCollection("admin").insert([ {
    _id: ObjectId("6085aaa772e70727ee771397"),
    "admin_name": "admin",
    password: "4297f44b13955235245b2497399d7a93",
    phone: "17728890933",
    deleted: NumberInt("0"),
    "register_time": ISODate("2021-04-25T17:45:11.313Z"),
    _class: "com.hzhq.contract.bean.entity.Admin"
} ]);
db.getCollection("admin").insert([ {
    _id: ObjectId("60a23c5bea410000fe006b25"),
    "admin_name": "test1",
    password: "202cb962ac59075b964b07152d234b70",
    deleted: 0,
    phone: 123456
} ]);

// ----------------------------
// Collection structure for company
// ----------------------------
db.getCollection("company").drop();
db.createCollection("company");

// ----------------------------
// Documents of company
// ----------------------------
db.getCollection("company").insert([ {
    _id: ObjectId("6085aa78339a9e65973df7db"),
    "company_name": "A公司",
    address: "杭州",
    type: "互联网",
    phone: "a123",
    email: "xxx@a.com",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Company"
} ]);
db.getCollection("company").insert([ {
    _id: ObjectId("6085aa78339a9e65973df7dc"),
    "company_name": "B公司",
    address: "成都",
    type: "地产",
    phone: "b123",
    email: "xxx@b.com",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Company"
} ]);
db.getCollection("company").insert([ {
    _id: ObjectId("6085aa78339a9e65973df7dd"),
    "company_name": "C公司",
    address: "上海",
    type: "金融",
    phone: "c123",
    email: "xxx@c.com",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Company"
} ]);
db.getCollection("company").insert([ {
    _id: ObjectId("6085aa78339a9e65973df7de"),
    "company_name": "D公司",
    address: "郑州",
    type: "农业",
    phone: "d123",
    email: "xxx@d.com",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Company"
} ]);
db.getCollection("company").insert([ {
    _id: ObjectId("6085aa78339a9e65973df7df"),
    "company_name": "E公司",
    address: "珠海",
    type: "制造",
    phone: "e123",
    email: "xxx@e.com",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Company"
} ]);
db.getCollection("company").insert([ {
    _id: ObjectId("6085aa78339a9e65973df7e0"),
    "company_name": "F公司",
    address: "大连",
    type: "能源",
    phone: "f123",
    email: "xxx@f.com",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Company"
} ]);
db.getCollection("company").insert([ {
    _id: ObjectId("60a50ee35b0fdd6b07cf52b8"),
    "company_name": "h公司",
    address: "上海",
    type: "有限责任公司",
    phone: "123123",
    email: "123123@mail.com",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.Company"
} ]);

// ----------------------------
// Collection structure for contract
// ----------------------------
db.getCollection("contract").drop();
db.createCollection("contract");
db.getCollection("contract").createIndex({
    "contract_name": ""
}, {
    name: "contract_name",
    unique: true
});
db.getCollection("contract").createIndex({
    "contract_type": ""
}, {
    name: "contract_type"
});
db.getCollection("contract").createIndex({
    "contact_person": ""
}, {
    name: "contact_person"
});

// ----------------------------
// Documents of contract
// ----------------------------
db.getCollection("contract").insert([ {
    _id: ObjectId("60955a635204ab0da508b7fc"),
    "contract_name": "test2",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7e0"))
    ],
    "contact_person": "zhangsan",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91666")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("0"),
    "start_time": ISODate("2021-04-22T01:00:00.000Z"),
    "end_time": ISODate("2021-05-22T01:00:00.000Z"),
    "extern_list": [
        {
            name: "key1",
            value: "value1",
            type: "String"
        }
    ],
    "create_time": ISODate("2021-05-07T15:18:59.022Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    deleted: NumberInt("0"),
    edited: NumberInt("0"),
    passed: NumberInt("0"),
    completed: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);
db.getCollection("contract").insert([ {
    _id: ObjectId("60955a635204ab0da508b7fd"),
    "contract_name": "test5",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7de"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7e0"))
    ],
    "contact_person": "zhangsan",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91666")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("0"),
    "start_time": ISODate("2021-04-22T01:00:00.000Z"),
    "end_time": ISODate("2021-05-22T01:00:00.000Z"),
    "extern_list": [
        {
            name: "key1",
            value: "value1",
            type: "String"
        }
    ],
    "create_time": ISODate("2021-05-07T15:18:59.023Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    deleted: NumberInt("0"),
    edited: NumberInt("0"),
    passed: NumberInt("0"),
    completed: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);
db.getCollection("contract").insert([ {
    _id: ObjectId("60955c98fd0ad1014b4e5ada"),
    "contract_name": "A公司的第一个审计合同",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7db"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc"))
    ],
    "contact_person": "lisi",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91662")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("703"),
    "start_time": ISODate("2021-04-16T06:22:14.000Z"),
    "end_time": ISODate("2021-04-22T06:22:14.000Z"),
    "extern_list": [
        {
            name: "test",
            value: "test"
        }
    ],
    "create_time": ISODate("2021-05-07T15:28:24.827Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    deleted: NumberInt("0"),
    edited: NumberInt("0"),
    passed: NumberInt("0"),
    completed: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);
db.getCollection("contract").insert([ {
    _id: ObjectId("6099dc3beddf014d3382a2e7"),
    "contract_name": "测试附件",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7db"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc"))
    ],
    "contact_person": "lisi",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91662")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("0"),
    "start_time": ISODate("2021-04-16T06:22:14.000Z"),
    "end_time": ISODate("2021-04-22T06:22:14.000Z"),
    "extern_list": [
        {
            name: "test",
            value: "test"
        }
    ],
    "create_time": ISODate("2021-05-11T01:22:03.586Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    deleted: NumberInt("0"),
    edited: NumberInt("0"),
    passed: NumberInt("0"),
    completed: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);
db.getCollection("contract").insert([ {
    _id: ObjectId("60a13011bbc78724380ab4df"),
    "contract_name": "测试",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af7")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7db"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc")),
        DBRef("company", ObjectId("6085aa78339a9e65973df7dd"))
    ],
    "contact_person": "lisi",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91662")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("0"),
    "start_time": ISODate("2021-04-08T06:22:17.000Z"),
    "end_time": ISODate("2021-04-22T06:22:14.000Z"),
    "extern_list": [
        {
            name: "test",
            value: "test"
        },
        {
            name: "测试",
            value: "字段"
        }
    ],
    "create_time": ISODate("2021-05-16T14:45:37.561Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    deleted: NumberInt("0"),
    edited: NumberInt("1"),
    passed: NumberInt("0"),
    completed: NumberInt("0"),
    "last_edited_user": "zhangsan",
    "edited_time": ISODate("2021-05-17T05:57:26.000Z"),
    "approval_person": "admin",
    "approval_content": "我感觉不太行",
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);
db.getCollection("contract").insert([ {
    _id: ObjectId("60a5591aa5dbcd1fda78da66"),
    "contract_name": "我的第一个模板",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7db"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc"))
    ],
    "contact_person": "zhangsan",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91666")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("22"),
    "start_time": ISODate("2021-05-20T18:29:00.000Z"),
    "end_time": ISODate("2021-05-25T18:29:03.000Z"),
    "extern_list": [
        {
            name: "test",
            value: "1"
        }
    ],
    "create_time": ISODate("2021-05-19T18:29:46.447Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    "template_id": ObjectId("60a23075569c774506fb1ec8"),
    "template_name": "我的第一个模板",
    deleted: NumberInt("0"),
    edited: NumberInt("1"),
    passed: NumberInt("1"),
    completed: NumberInt("1"),
    "last_edited_user": "admin",
    "edited_time": ISODate("2021-05-20T02:46:16.000Z"),
    "approval_person": "admin",
    "approval_content": "通过",
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);
db.getCollection("contract").insert([ {
    _id: ObjectId("60a5cf3899206f26aa877612"),
    "contract_name": "测试2",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7db")),
        DBRef("company", ObjectId("6085aa78339a9e65973df7de"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc")),
        DBRef("company", ObjectId("6085aa78339a9e65973df7df"))
    ],
    "contact_person": "zhangsan",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91666")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("910"),
    "start_time": ISODate("2021-05-06T02:51:50.000Z"),
    "end_time": ISODate("2021-05-13T02:51:55.000Z"),
    "extern_list": [
        {
            name: "地点",
            value: "杭州"
        }
    ],
    "create_time": ISODate("2021-05-20T02:53:44.157Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    "template_id": ObjectId("60a23075569c774506fb1ec8"),
    "template_name": "我的第一个模板",
    deleted: NumberInt("0"),
    edited: NumberInt("1"),
    passed: NumberInt("1"),
    completed: NumberInt("0"),
    "last_edited_user": "admin",
    "edited_time": ISODate("2021-05-25T11:11:02.000Z"),
    "passed_time": ISODate("2021-05-25T11:11:02.000Z"),
    "approval_person": "admin",
    "approval_content": "butongguo",
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);
db.getCollection("contract").insert([ {
    _id: ObjectId("60aced4d5e19c01dab6749fc"),
    "contract_name": "test111",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af6")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc")),
        DBRef("company", ObjectId("6085aa78339a9e65973df7dd"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7de")),
        DBRef("company", ObjectId("6085aa78339a9e65973df7df"))
    ],
    "contact_person": "wangwu",
    "contact_phone": "1",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91664")),
    "contract_amount": NumberDecimal("1000"),
    "current_amount": NumberDecimal("111"),
    "start_time": ISODate("2021-05-13T12:26:25.000Z"),
    "end_time": ISODate("2021-05-21T12:25:31.000Z"),
    "extern_list": [
        {
            name: "地点",
            value: "杭州"
        }
    ],
    "create_time": ISODate("2021-05-25T12:27:57.036Z"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    deleted: NumberInt("0"),
    edited: NumberInt("1"),
    passed: NumberInt("1"),
    completed: NumberInt("0"),
    "last_edited_user": "admin",
    "edited_time": ISODate("2021-05-25T12:32:44.000Z"),
    "passed_time": ISODate("2021-05-25T12:32:44.000Z"),
    "approval_person": "admin",
    "approval_content": "审批通过",
    _class: "com.hzhq.contract.bean.entity.Contract"
} ]);

// ----------------------------
// Collection structure for contract_attachment
// ----------------------------
db.getCollection("contract_attachment").drop();
db.createCollection("contract_attachment");

// ----------------------------
// Collection structure for contract_status
// ----------------------------
db.getCollection("contract_status").drop();
db.createCollection("contract_status");

// ----------------------------
// Documents of contract_status
// ----------------------------
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60955c98fd0ad1014b4e5add"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "第一次收款",
    payment: NumberDecimal("100"),
    "operate_time": ISODate("2021-05-07T15:26:09.000Z"),
    desc: "",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60955c98fd0ad1014b4e5ade"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "第二次收款",
    payment: NumberDecimal("150"),
    "operate_time": ISODate("2021-05-07T15:26:52.000Z"),
    desc: "卖了很多",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60955c98fd0ad1014b4e5adf"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "第三次收款",
    payment: NumberDecimal("300"),
    "operate_time": ISODate("2021-05-07T15:27:07.000Z"),
    desc: "又卖了很多",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60955c98fd0ad1014b4e5ae0"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "计算之前的",
    payment: NumberDecimal("100"),
    "operate_time": ISODate("2021-05-07T15:27:44.000Z"),
    desc: "算旧账",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("609826b6450b345c6f96684d"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "第四次收款",
    payment: NumberDecimal("66"),
    "operate_time": ISODate("2021-05-09T18:15:16.000Z"),
    desc: "说明",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60982736450b345c6f96684e"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "测试",
    payment: NumberDecimal("10"),
    "operate_time": ISODate("2021-05-09T18:17:25.000Z"),
    desc: "测试",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60982759450b345c6f96684f"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "test",
    payment: NumberDecimal("11"),
    "operate_time": ISODate("2021-05-09T18:18:00.000Z"),
    desc: "1",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("609895b56067ac2716285f4f"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "test",
    payment: NumberDecimal("11"),
    "operate_time": ISODate("2021-05-10T02:08:52.000Z"),
    desc: "test1",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("609898426067ac2716285f50"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "测试",
    payment: NumberDecimal("11"),
    "operate_time": ISODate("2021-05-10T02:19:45.000Z"),
    desc: "测试",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("609898736067ac2716285f51"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "测试1",
    payment: NumberDecimal("11"),
    "operate_time": ISODate("2021-05-10T02:20:35.000Z"),
    desc: "测试1",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60989d386067ac2716285f52"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "测试",
    payment: NumberDecimal("11"),
    "operate_time": ISODate("2021-05-10T02:40:55.000Z"),
    desc: "测试1",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60989dfe215cf07d7cdb9c04"),
    "contract_id": ObjectId("60955c98fd0ad1014b4e5ada"),
    "status_name": "测试1",
    payment: NumberDecimal("10"),
    "operate_time": ISODate("2021-05-10T02:40:55.000Z"),
    desc: "测试111",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60a13011bbc78724380ab4e0"),
    "contract_id": ObjectId("60a13011bbc78724380ab4df"),
    "status_name": "a",
    payment: NumberDecimal("0"),
    "operate_time": ISODate("2021-04-22T06:22:14.000Z"),
    desc: "aaa",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60a5591aa5dbcd1fda78da67"),
    "contract_id": ObjectId("60a5591aa5dbcd1fda78da66"),
    "status_name": "aaa",
    payment: NumberDecimal("22"),
    "operate_time": ISODate("2021-05-19T18:29:11.000Z"),
    desc: "123123",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60a5cf3899206f26aa877613"),
    "contract_id": ObjectId("60a5cf3899206f26aa877612"),
    "status_name": "test",
    payment: NumberDecimal("10"),
    "operate_time": ISODate("2021-05-20T02:52:54.000Z"),
    desc: "测试",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60aced4d5e19c01dab6749fd"),
    "contract_id": ObjectId("60aced4d5e19c01dab6749fc"),
    "status_name": "aaa",
    payment: NumberDecimal("111"),
    "operate_time": ISODate("2021-05-25T12:26:58.000Z"),
    desc: "ccc",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);
db.getCollection("contract_status").insert([ {
    _id: ObjectId("60acee025e19c01dab674a00"),
    "contract_id": ObjectId("60a5cf3899206f26aa877612"),
    "status_name": "test11",
    payment: NumberDecimal("900"),
    "operate_time": ISODate("2021-05-11T16:00:00.000Z"),
    desc: "ce",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractStatus"
} ]);

// ----------------------------
// Collection structure for contract_template
// ----------------------------
db.getCollection("contract_template").drop();
db.createCollection("contract_template");

// ----------------------------
// Documents of contract_template
// ----------------------------
db.getCollection("contract_template").insert([ {
    _id: ObjectId("60a23075569c774506fb1ec8"),
    "template_name": "我的第一个模板",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7db"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7dc"))
    ],
    "contact_person": "zhangsan",
    "contact_phone": "123",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91666")),
    "contract_amount": "1000",
    "extern_list": [
        {
            name: "签订地点",
            value: "杭州",
            type: "String"
        }
    ],
    "create_time": ISODate("2021-05-17T08:59:33.027Z"),
    deleted: NumberInt("0"),
    passed: NumberInt("0"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    _class: "com.hzhq.contract.bean.entity.ContractTemplate"
} ]);
db.getCollection("contract_template").insert([ {
    _id: ObjectId("60a54abdeead5433ce0d306d"),
    "template_name": "test",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af6")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7de"))
    ],
    companiesB: [ ],
    "contact_person": "",
    "contact_phone": "",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91665")),
    "contract_amount": "0",
    "extern_list": [
        {
            name: "",
            value: ""
        }
    ],
    "create_time": ISODate("2021-05-19T17:28:29.596Z"),
    deleted: NumberInt("1"),
    passed: NumberInt("0"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    _class: "com.hzhq.contract.bean.entity.ContractTemplate"
} ]);
db.getCollection("contract_template").insert([ {
    _id: ObjectId("60a54ae7eead5433ce0d306e"),
    "template_name": "test1",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af6")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7de"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7df"))
    ],
    "contact_person": "",
    "contact_phone": "",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91665")),
    "contract_amount": "0",
    "extern_list": [
        {
            name: "test",
            value: "tesrt"
        }
    ],
    "create_time": ISODate("2021-05-19T17:29:11.649Z"),
    deleted: NumberInt("1"),
    passed: NumberInt("0"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    _class: "com.hzhq.contract.bean.entity.ContractTemplate"
} ]);
db.getCollection("contract_template").insert([ {
    _id: ObjectId("60a54b78eead5433ce0d306f"),
    "template_name": "test2",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af6")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7df"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7e0")),
        DBRef("company", ObjectId("6085aa78339a9e65973df7dd"))
    ],
    "contact_person": "test1",
    "contact_phone": "test1",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91665")),
    "contract_amount": "0",
    "extern_list": [
        {
            name: "test",
            value: "1"
        }
    ],
    "create_time": ISODate("2021-05-19T17:31:36.68Z"),
    deleted: NumberInt("1"),
    passed: NumberInt("0"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    _class: "com.hzhq.contract.bean.entity.ContractTemplate"
} ]);
db.getCollection("contract_template").insert([ {
    _id: ObjectId("60a54e256952910797686907"),
    "template_name": "test",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af5")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7df"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7e0"))
    ],
    "contact_person": "wangwu",
    "contact_phone": "1",
    depart: DBRef("depart", ObjectId("6085aac4d4d83d1420f91665")),
    "contract_amount": "0",
    "extern_list": [
        {
            name: "11",
            value: "11"
        }
    ],
    "create_time": ISODate("2021-05-19T17:43:01.649Z"),
    deleted: NumberInt("1"),
    passed: NumberInt("0"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    _class: "com.hzhq.contract.bean.entity.ContractTemplate"
} ]);
db.getCollection("contract_template").insert([ {
    _id: ObjectId("60a5548ca5dbcd1fda78da65"),
    "template_name": "测试",
    "contract_type": DBRef("contract_type", ObjectId("6085ac73882e5b5b0f632af9")),
    companiesA: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7de"))
    ],
    companiesB: [
        DBRef("company", ObjectId("6085aa78339a9e65973df7db"))
    ],
    "contact_person": "test1",
    "contact_phone": "111212345111",
    depart: DBRef("depart", ObjectId("60a401b50125053910134bb1")),
    "contract_amount": "10000",
    "extern_list": [
        {
            name: "地点",
            value: "杭州"
        }
    ],
    "create_time": ISODate("2021-05-19T18:10:20.083Z"),
    deleted: NumberInt("0"),
    passed: NumberInt("0"),
    "create_user": DBRef("user", ObjectId("6085ac812214067363d12b40")),
    _class: "com.hzhq.contract.bean.entity.ContractTemplate"
} ]);

// ----------------------------
// Collection structure for contract_type
// ----------------------------
db.getCollection("contract_type").drop();
db.createCollection("contract_type");

// ----------------------------
// Documents of contract_type
// ----------------------------
db.getCollection("contract_type").insert([ {
    _id: ObjectId("6085ac73882e5b5b0f632af5"),
    "type_code": NumberInt("1"),
    "type_name": "审计合同",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);
db.getCollection("contract_type").insert([ {
    _id: ObjectId("6085ac73882e5b5b0f632af6"),
    "type_code": NumberInt("2"),
    "type_name": "销售合同",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);
db.getCollection("contract_type").insert([ {
    _id: ObjectId("6085ac73882e5b5b0f632af7"),
    "type_code": NumberInt("3"),
    "type_name": "咨询合同",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);
db.getCollection("contract_type").insert([ {
    _id: ObjectId("6085ac73882e5b5b0f632af8"),
    "type_code": NumberInt("4"),
    "type_name": "服务合同",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);
db.getCollection("contract_type").insert([ {
    _id: ObjectId("6085ac73882e5b5b0f632af9"),
    "type_code": NumberInt("5"),
    "type_name": "工程合同",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);
db.getCollection("contract_type").insert([ {
    _id: ObjectId("60a3f375c0cf002dd0deee4b"),
    "type_code": NumberInt("2"),
    "type_name": "测试类别",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);
db.getCollection("contract_type").insert([ {
    _id: ObjectId("60a3f54b2c34d17afb9f8840"),
    "type_code": NumberInt("6"),
    "type_name": "测试合同",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);
db.getCollection("contract_type").insert([ {
    _id: ObjectId("60a5d04299206f26aa877618"),
    "type_code": NumberInt("7"),
    "type_name": "测试",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.ContractType"
} ]);

// ----------------------------
// Collection structure for depart
// ----------------------------
db.getCollection("depart").drop();
db.createCollection("depart");

// ----------------------------
// Documents of depart
// ----------------------------
db.getCollection("depart").insert([ {
    _id: ObjectId("6085aac4d4d83d1420f91662"),
    "depart_name": "行政部",
    desc: "管理公司",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("6085aac4d4d83d1420f91663"),
    "depart_name": "财务部",
    desc: "管理财务",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("6085aac4d4d83d1420f91664"),
    "depart_name": "营销部",
    desc: "负责宣传",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("6085aac4d4d83d1420f91665"),
    "depart_name": "营运部",
    desc: "负责运营",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("6085aac4d4d83d1420f91666"),
    "depart_name": "技术部",
    desc: "负责技术",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("6085aac4d4d83d1420f91667"),
    "depart_name": "人力资源部",
    desc: "负责管理员工",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("6085aac4d4d83d1420f91668"),
    "depart_name": "客户服务部",
    desc: "客户支持服务",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("60a401b50125053910134bb1"),
    "depart_name": "测试部门",
    desc: "1",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("60a401d40125053910134bb2"),
    desc: "真好",
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);
db.getCollection("depart").insert([ {
    _id: ObjectId("60a403060125053910134bb3"),
    "depart_name": "测试2",
    desc: "1213123",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Depart"
} ]);

// ----------------------------
// Collection structure for role
// ----------------------------
db.getCollection("role").drop();
db.createCollection("role");

// ----------------------------
// Documents of role
// ----------------------------
db.getCollection("role").insert([ {
    _id: ObjectId("6085abaf7cadab293153a513"),
    "role_code": NumberInt("0"),
    "role_name": "管理员",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Role"
} ]);
db.getCollection("role").insert([ {
    _id: ObjectId("6085abaf7cadab293153a514"),
    "role_code": NumberInt("1"),
    "role_name": "审批人员",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Role"
} ]);
db.getCollection("role").insert([ {
    _id: ObjectId("6085abaf7cadab293153a515"),
    "role_code": NumberInt("2"),
    "role_name": "录入人员",
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.Role"
} ]);

// ----------------------------
// Collection structure for user
// ----------------------------
db.getCollection("user").drop();
db.createCollection("user");

// ----------------------------
// Documents of user
// ----------------------------
db.getCollection("user").insert([ {
    _id: ObjectId("6085ac812214067363d12b40"),
    username: "zhangsan",
    password: "4297f44b13955235245b2497399d7a93",
    phone: "123",
    "register_time": ISODate("2021-04-25T17:53:05.202Z"),
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.User"
} ]);
db.getCollection("user").insert([ {
    _id: ObjectId("6085ac812214067363d12b41"),
    username: "lisi",
    password: "e10adc3949ba59abbe56e057f20f883e",
    phone: "1234",
    "register_time": ISODate("2021-04-25T17:53:05.202Z"),
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.User"
} ]);
db.getCollection("user").insert([ {
    _id: ObjectId("6085ac812214067363d12b42"),
    username: "wangwu",
    password: "4297f44b13955235245b2497399d7a93",
    phone: "1",
    "register_time": ISODate("2021-04-25T17:53:05.202Z"),
    deleted: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.User"
} ]);
db.getCollection("user").insert([ {
    _id: ObjectId("6085ac9008a71301bd50a1d0"),
    username: "dzr",
    password: "4297f44b13955235245b2497399d7a93",
    phone: "123",
    "register_time": ISODate("2021-04-25T17:53:20.565Z"),
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.User"
} ]);
db.getCollection("user").insert([ {
    _id: ObjectId("60a2066f50f15e79480a39f5"),
    username: "test1",
    password: "e10adc3949ba59abbe56e057f20f883e",
    phone: "111212345111",
    "register_time": ISODate("2021-05-17T06:00:15.265Z"),
    deleted: NumberInt("1"),
    _class: "com.hzhq.contract.bean.entity.User"
} ]);

// ----------------------------
// Collection structure for user_role
// ----------------------------
db.getCollection("user_role").drop();
db.createCollection("user_role");

// ----------------------------
// Documents of user_role
// ----------------------------
db.getCollection("user_role").insert([ {
    _id: ObjectId("6085ac9cc4bca35fcf4da3df"),
    user: DBRef("user", ObjectId("6085ac812214067363d12b40")),
    role: DBRef("role", ObjectId("6085abaf7cadab293153a513")),
    admin: DBRef("admin", ObjectId("6085aaa772e70727ee771397")),
    "assign_time": ISODate("2021-04-25T17:53:32.79Z"),
    deleted: NumberInt("0"),
    passed: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.UserRole"
} ]);
db.getCollection("user_role").insert([ {
    _id: ObjectId("6085ac9cc4bca35fcf4da3e0"),
    user: DBRef("user", ObjectId("6085ac812214067363d12b41")),
    role: DBRef("role", ObjectId("6085abaf7cadab293153a514")),
    admin: DBRef("admin", ObjectId("6085aaa772e70727ee771397")),
    "assign_time": ISODate("2021-04-25T17:53:32.79Z"),
    deleted: NumberInt("0"),
    passed: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.UserRole"
} ]);
db.getCollection("user_role").insert([ {
    _id: ObjectId("6085ac9cc4bca35fcf4da3e1"),
    user: DBRef("user", ObjectId("6085ac812214067363d12b42")),
    role: DBRef("role", ObjectId("6085abaf7cadab293153a515")),
    admin: DBRef("admin", ObjectId("6085aaa772e70727ee771397")),
    "assign_time": ISODate("2021-04-25T17:53:32.79Z"),
    deleted: NumberInt("0"),
    passed: NumberInt("0"),
    _class: "com.hzhq.contract.bean.entity.UserRole"
} ]);
